import xadmin
from .models import UserModel,TeacherModel,OrderModel,CollectionModel


class UserModelAdmin(object):
    fields = ["name","phone"]
    list_display =  ["name","phone"]


xadmin.site.register(UserModel, UserModelAdmin)


class TeacherModelAdmin(object):
    fields = ["name","phone","level"]
    list_display =  ["name","phone","level"]

xadmin.site.register(TeacherModel, TeacherModelAdmin)

class OrderModelModelAdmin(object):
    fields = ["number","order_time","phone","share_user","course_name","money","num","introduce","course_number","apply_start_time","apply_end_time","start_time","end_time","learning"]
    list_display =  ["number","order_time","phone","share_user","course_name","money","num","introduce","course_number","apply_start_time","apply_end_time","start_time","end_time","learning"]

xadmin.site.register(OrderModel, OrderModelModelAdmin)

class CollectionModelAdmin(object):
    fields = ["number","phone","share_user","money","introduce","apply_start_time","apply_end_time","start_time","end_time","learning"]
    list_display =  ["number","phone","share_user","money","introduce","apply_start_time","apply_end_time","start_time","end_time","learning"]

xadmin.site.register(CollectionModel, CollectionModelAdmin)